<?php
$partner_id = (int)$this->partner_id;
if ($partner_id > 0) {

$allCategory = $this->allCategory;
$partner = $allCategory[$partner_id];

@$children = $partner['children'];
?>



<div class="customerTestimonials">
    <h3>Doi tac</h3>

    <div id='slide_container'>
        <a href='#' id="slide_prev" title='previous slide'></a>
        <div id="slider">
    <?php
    if(count($children) > 0) {
        foreach ($children as $key => $value):
            $child = $allCategory[$value];
            
            $path = pathinfo($child['main_image'], PATHINFO_DIRNAME);
            $fileName = pathinfo($child['main_image'], PATHINFO_BASENAME);
    ?>
            <div class="slide">
                <div class="video-brand">
                    <div class="brand">
                        <img src="<?=ImageUtil::getImage($path, $fileName, 150, 70, 100, false)?>" alt="<?php echo htmlspecialchars($child['admin_title'])?>" class="company" />
                    </div><!-- end brand -->
                    <div class='clear'></div>
                </div><!-- end video brand -->
                <div class="pull-quote slide-1">
                    <p>
                        <?php echo $child['description']?>
                        <span class='quote-credit'><?php echo $child['admin_title']?></span>
                    </p>
                </div><!-- end pull -->
                <div class='clear'></div>
            </div><!-- end slide -->
    <?php
        endforeach;
    } // if children

    ?>
        </div><!-- end slider -->
        <a href='#' id="slide_next" title='next slide'></a>
    </div><!-- end slide_container -->
</div>

<script type="text/javascript" charset="utf-8">

    $(document).ready(function(){
		$('#slider').cycle({
		    fx: 'scrollHorz',
		    timeout:  5000,
            speed: 2000,
		    prev: '#slide_prev',
		    next: '#slide_next',
            cleartypeNoBg: false
		});
		//_________ end slider _________\\
    });
</script>
<?php
} // if partner
?>